package client

import (
	"google.golang.org/protobuf/proto"

	"gitee.com/hasika/common-server/conn/inet"
)

type IClient interface {
	RawSend([]byte) error
}

type SimpleClient interface {
	Conn() inet.Conn
	CallBodyWithCallback(message proto.Message, callback func(message proto.Message, e error)) error
	CallBodyAndWait(message proto.Message) (proto.Message, error)
	CallBodyOnly(message proto.Message) error
}

type IMixesSimpleClient interface {
	CallBodyWithCallback(connectionType inet.ConnectionType, message proto.Message, callback func(message proto.Message, e error)) error
	CallBodyAndWait(connectionType inet.ConnectionType, message proto.Message) (proto.Message, error)
	CallBodyOnly(connectionType inet.ConnectionType, message proto.Message) error
}
